package com.prs.crm.service.impl;

import java.util.Collection;

import org.hibernate.criterion.DetachedCriteria;

import com.prs.crm.dao.QueryDao;
import com.prs.crm.service.QueryService;

public class QueryServiceImpl implements QueryService{
	
	private QueryDao queryDao;

	public void setQueryDao(QueryDao queryDao) {
		this.queryDao = queryDao;
	}

	public QueryDao getQueryDao() {
		return queryDao;
	}

	@SuppressWarnings("unchecked")
	public Object load(Class cls,java.io.Serializable id)
	{
		return this.getQueryDao().load(cls, id);
	}
	
	public Collection<?> query(DetachedCriteria criteria)
	{
		return this.getQueryDao().query(criteria);
	}
}

